package com.scs.application.core.utils;

/**
 * @Description: 编号规则owner相关工具类
 */
public class SerialOwnerUtils {

    private static final String DEFAULT_OWNER = "0";

    /**
     * 获取默认的OWNER
     *
     * @return
     */
    public static String getDefaultOwner() {
        return DEFAULT_OWNER;
    }

    /**
     * 获取指定医院OWNER
     * @param hospitalId
     * @return
     */
    public static String getHospitalOwner(String hospitalId) {
        return "H" + hospitalId;
    }

    /**
     * 获取当前医院的OWNER
     *
     * @return
     */
    public static String getHospitalOwner() {
        String hospitalId = UserUtils.getHospitalId();
        return getHospitalOwner(hospitalId);
    }

    /**
     * 获取当前供应商的OWNER
     *
     * @return
     */
    public static String getSupplierOwner() {
        String supplierId = UserUtils.getSupplierId();
        return getSupplierOwner(supplierId);
    }

    public static String getSupplierOwner(String supplierId) {
        return "S" + supplierId;
    }
}
